<? 
	$protectid="14"; 
	include("../protect.php");
	
	include_once("../../config.inc.php");
	
	include_once(CFG_LIB_DIR.'mysqldb.inc.php');
	$objDb = new mysqldb();
   
   $id=implode($_POST['sel'],",");

if($_POST['action'] == "del" ){

     $sql="delete from `".con_strPREFIX."order` where id in (".$id.") ";

   $rt=$objDb->query($sql);
   if($rt){
			   echo "<script language=\"javascript\">\n";
               echo "alert('删除成功!');\n";
			   echo "location.href='index.php';\n";
               echo "</script>";
            }else{
               echo "<script language=\"javascript\">\n";
               echo "alert('删除失败!');\n";
               echo "history.go(-1);\n";
               echo "</script>";
             }
} else {
 $sql="update  `".con_strPREFIX."order` set state = '".$_POST['action']."' where id in (".$id.") ";

   $rt=$objDb->query($sql);
   if($rt){
			   echo "<script language=\"javascript\">\n";
               echo "alert('操作成功!');\n";
			   echo "location.href='index.php';\n";
               echo "</script>";
            }else{
               echo "<script language=\"javascript\">\n";
               echo "alert('操作失败!');\n";
               echo "history.go(-1);\n";
               echo "</script>";
             }

}



?>